home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20000824-20010305
/
000037_news@columbia.edu _Sun Sep 24 05:38:43 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
6KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id FAA26362
for <kermit.misc@cpunix.cc.columbia.edu>; Sun, 24 Sep 2000 05:38:42 -0400 (EDT)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id FAA27658
for <kermit.misc@watsun.cc.columbia.edu>; Sun, 24 Sep 2000 05:38:42 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id FAA15615
for kermit.misc@watsun.cc.columbia.edu; Sun, 24 Sep 2000 05:21:31 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: <Use-Author-Address-Header@[127.1]>
Subject: kermit/lynx co-ordination notes
Message-ID: <E13d2oS-0002KR-00@dxmcgyver>
Date: Sat, 23 Sep 2000 20:50:48 -0700
Organization: mail2news@nym.alias.net
To: kermit.misc@columbia.edu
I'm posting this to comp.protocols.kermit.misc & oclug@oclug.org
(Orange County Linux Users Group) to make public some
tips for coordinating Kermit and Lynx, and maybe get some
constructive feedback. I'm posting to oclug as a prelude
to some possible web pages on use of Lynx, at their web site
or my personal site.
1) The version of ckermit2.txt that I currently have,
in the section on invoking C-Kermit from your browser (1.3.2),
it states that 'As far as we know, this can be done only at compile time.'
*IF* your version of Lynx is compiled with general External support,
in your /etc/lynx.cfg file there should be some lines like:
#***Must be compiled with USE_EXTERNALS to enable EXTERN ***
KEYMAP:.:EXTERN # Run external program with url
# or possibly:
KEYMAP:,:EXTERN # run EXTERNAL with URL. added by d.e.l.
Make sure one of these is uncommented (no preceeding '#'),
or add the lines if necessary.
They should be located in a general set of Keymaps, with a lot of
other similar statements, many, the defaults may be commented out.
Later in the file there will be a section called EXTERNAL.
There you should have some lines:
USE_EXTERNALS:TRUE
EXTERNAL:ftp:wget --passive -P ~/download -q %s &:TRUE
EXTERNAL:http:wget --passive -P ~/download -q %s &:TRUE
EXTERNAL:telnet:kermit -J %s:TRUE
EXTERNAL:iksd:kermit -J %s:1649 :TRUE
The only ones needed for running kermit are the 'USE_EXTERNALS:TRUE'
and the lines with 'kermit -J' in them. The others, I include
simply to show typical other external programs that could be
defined. Again, make sure that there is no preceeding '#' on
the line that would comment it out and render the line inoperative.
Now, when you hit return at a focused link, the default behavior of
Lynx will result as typical - for instance if a 'telnet://aztec2.asu.edu'
link the conventional and less capable telnet program will be invoked.
If however, you hit '.' (or whatever you chose in the Keymap statement),
C-Kermit will be invoked instead.
Similarly, over a http or ftp link, '.' will in the case shown above
invoke the wget program on the http or ftp URL to download the file.
Rather than a binary executable, the program specified by the
EXTERNAL statement can be a shebang script ('#!/path/interpreter'
on line 1), that could present a menu
of options on how to handle the URL it is passed.
This is possible because of how UNIX invokes external programs giving
shebang scripts pretty much equality with binary executables.
(Another possibility might be Frank de Cruz's 'IKSDget' script.)
My personal experience is that the program specification seemed
sensitve to trailing spaces, so a little bit of experimentation may
be needed.
This can be used to enable Lynx to cope with URL schema it has no
compiled in basis to deal with. For this reason I speculativly
put the 'IKSD://' (Internet Kermit Server Daemon) example above.
2) I frequently run Lynx from kermit using the C-Kermit 7 pty
capability. Typically this is to automate login to web based email
accounts. It could also be used to log the browsing session.
Recently I ran into an instance where I was trying
to pass a string with included blanks to lynx on its' startup:
.......
set network type pty
...
set host lynx -parameter='some string' URL://somewhere.something
...
and lynx interpreted this as
set host lynx -parameter='some string' URL://somewhere.something
**************** ******* ************************
such that it thought '-parameter' was being set to "'some",
and a switch "string'" being included. I think this is basicly
because Lynx normally depends on the shell it
is invoked from to set up the argv/argc it uses to read the
command line parameters from.
Maybe there is a more elegant way to handle this, but one approach I
found that worked was to:
set host { /bin/bash -c -
" exec lynx -parameter='some string' URL://somewhere.something" }
invoking bash just long enough to set up the argv/argc input,
before it gets overlaid by Lynx.
Another approach that seems to work is to direct the command line
input to Lynx from standard input:
set host {lynx -}
output {-parameter=some string\13}
output {URL://somewhere.something\13}
output {\4} # end of input, ^D
Anyway, enough.
Regards,
Dallas E. Legan II / leganii@surfree.com / dallasii@kincyb.com
Powered by......Lynx, the Internet at full speed.